package org.holoeverywhere.preference; import android.content.Context; import android.util.AttributeSet; import android.view.View; import android.widget.Checkable; public class CheckBoxPreference extends TwoStatePreference { public CheckBoxPreference(Context context) { this(context, null); } public CheckBoxPreference(Context context, AttributeSet attrs) { this(context, attrs, R.attr.checkBoxPreferenceStyle); } public CheckBoxPreference(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } @Override protected void onBindView(View view) { super.onBindView(view); View checkboxView = view.findViewById(R.id.checkbox); if (checkboxView != null && checkboxView instanceof Checkable) { ((Checkable) checkboxView).setChecked(mChecked); sendAccessibilityEvent(checkboxView); } syncSummaryView(view); } }